# -*- mode: snippet -*-
# name: if (...) { ... } else { ... }
# key: if.else.
# --
if ($1) {
   `yas-selected-text`$2
} else {
   $0
}